<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 页面弹出对话框，'你爱我吗',如果输入’爱‘,则结束，否则一直弹出对话框 -->
    <script>
        // 1.设置变量获取用户输入的内容赋值给变量
        // let answer = prompt('你爱我吗')
        while (true){
            let answer = prompt('你爱我吗')
            if(answer ==='爱'){
                break
            }else {
                continue
            }
        }
    </script>
</body>
</html>